Skip to content

Pokedex codes for mysql activity#1

Open
nomi7677 wants to merge 3 commits into
code-differently:mainfrom
nomi7677:main
Open

Pokedex codes for mysql activity#1
nomi7677 wants to merge 3 commits into
code-differently:mainfrom
nomi7677:main

Conversation

@nomi7677
Copy link
Copy Markdown

No description provided.

@kburd kburd self-requested a review March 1, 2021 19:49
Comment thread data/schema.sql
use pokedex;
CREATE TABLE pokemon (
pokemon_id INT PRIMARY KEY NOT NULL,
name VARCHAR(255) NOT NULL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing image src

Comment thread data/schema.sql Outdated
(4, 9),
(2, 10);

SELECT p.name, tp.type, pt.pokemon_type_id
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to submit queries in schema

Comment thread db/index.js Outdated
@@ -0,0 +1,25 @@
const mysql = require("mysql");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should all be in rest

Comment thread index.js Outdated
const express = require('express')
const app = express()
const port = 3000
const express = require("express");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should all be in rest

Comment thread rest/index.js Outdated
// console.log(`Example app listening at http://localhost:${port}`)
// })

const express = require("express");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice import!

Comment thread web/index.js Outdated
@@ -0,0 +1,6 @@
function getPokemon() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should display pokemon on webpage. Use your code from the group pokedex project here

Copy link
Copy Markdown
Contributor

@kburd kburd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, next step should be to pull pokemon data instead of customer data

Comment thread rest/index.js

let con = mysql.createConnection ({

password: "Pakistan@777",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you change your password haha

Comment thread data/schema.sql
ON tp.type_id = pt.type_id;
-- SELECT p.name, tp.type, pt.pokemon_type_id
-- FROM pokemon p
-- LEFT JOIN pokemon_type pt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its best to delete code instead of committing commenting out code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants